import Base from "./request.js"

const baseUrl = "/wechat"

export default class api extends Base {
	//用户登录
	static userLogin(options) {
		const url = baseUrl+"/base/openid"
		return this.get(url, options)
	}
	
	//获取用户信息
	static getUserInfo(options) {
		const url = baseUrl+"/base/passenger"
		return this.get(url, options)
	}
	
	//乘客注册
	static passengerRegister(options) {
		const url = baseUrl+"/register/passengerRegister"
		return this.post(url, options)
	}
	
	static editPassengerPhone(options){
		const url = baseUrl+"/passenger/phone/edit"
		return this.post(url, options)
	}
	
	//手机号码解密	/wechat/myCenter/decodePassengerPhone
	static decodePassengerPhone(options) {
		const url = baseUrl+"/myCenter/decodePassengerPhone"
		return this.get(url, options)
	}
	
	//发送短信验证码
	static sendSmsCode(options) {
		const url = baseUrl+"/register/sendSmsCode"
		return this.post(url, options)
	}
	
	//校验短信验证码
	static verifySmsCode(options) {
		const url = baseUrl+"/register/verifySmsCode"
		return this.post(url, options)
	}
	
	//获取网约车流程类型
	static wycProcessType(options) {
		const url = baseUrl+"/dictData/wyc/process/type"
		return this.get(url, options)
	}
	
	//获取后台参数
	static configInfo(options) {
		const url = "/system/config/info"
		return this.get(url, options)
	}
	
	//班车日期类型
	static qcspDateType(options){
		const url = "/monitor/dbc/qcsp/date/type"
		return this.post(url, options)
	}
	
	// =============== 网约车 ==================
	
	//创建订单
	static createOrder(options) {
		const url = baseUrl+"/order/create"
		return this.post(url, options)
	}
	
	//乘客轮询订单匹配情况
	static matchOrder(options) {
		const url = baseUrl+"/order/match"
		return this.get(url, options)
	}
	
	//订单状态
	static orderStatus(options) {
		const url = baseUrl+"/order/status"
		return this.get(url, options)
	}
	
	//预约单状态
	static subscribeStatus(options) {
		const url = baseUrl+"/order/subscribeStatus"
		return this.get(url, options)
	}
	
	//取消订单
	static cancelOrder(options) {
		const url = baseUrl+"/order/cancelOrderByPassenger"
		return this.post(url, {}, options)
	}
	
	//取消订单 - 退款
	static refundPay(options) {
		const url = baseUrl+"/operation/pay/refund"
		return this.get(url, options)
	}
	
	//历史订单列表
	static orderHistory(options) {
		const url = baseUrl+"/order/orderHistoryByPassenger"
		return this.post(url, {}, options)
	}
	
	//统一下单-支付
	static jsApiPay(options) {
		const url = baseUrl+"/operation/pay/jsApiPay"
		return this.get(url, options)
	}
	
	//获取车辆位置
	static vehicle(options) {
		const url = baseUrl+"/position/vehicle"
		return this.get(url, options)
	}
	
	//获取主页车辆s位置
	static findNeighPosition(options) {
		const url = baseUrl+"/position/findNeighPosition"
		return this.get(url, options)
	}
	
	//获取紧急联系人
	static selectContact(options) {
		const url = baseUrl+"/myCenter/selectEmergencyContact"
		return this.post(url, {}, options)
	}
	
	//新增紧急联系人
	static addContact(options) {
		const url = baseUrl+"/myCenter/addEmergencyContact"
		return this.post(url, options)
	}
	
	//修改紧急联系人
	static updateContact(options) {
		const url = baseUrl+"/myCenter/upEmergencyContact"
		return this.post(url, options)
	}
	
	//删除紧急联系人
	static delContact(options) {
		const url = baseUrl+"/myCenter/delEmergencyContact"
		return this.post(url, {}, options)
	}
	
	//查询家/公司地址
	static selectHomeAndOfficeAddr(options) {
		const url = baseUrl+"/myCenter/selectPassengerHomeAndOfficeAddr"
		return this.post(url, {}, options)
	}
	
	//新增家/公司地址
	static addHomeAndOfficeAddr(options) {
		const url = baseUrl+"/myCenter/addPassengerHomeAndOfficeAddr"
		return this.post(url, options)
	}
	
	//查询乘客评价司机分数
	static getScareByOrderId(options) {
		console.log(77777,typeof(options.orderId.toString()))
		const url = baseUrl+"/order/getOrderScoreByOrderId"
		return this.get(url, options)
	}
	
	//司机平均分数
	static getDriverAVGScore(options) {
		const url = baseUrl+"/order/getDriverAVGScore"
		return this.get(url, options)
	}
	
	//乘客评价司机新增
	static driverRatedPassenger(options) {
		const url = baseUrl+"/order/driverRatedPassenger"
		return this.post(url, options)
	}
	
	//随机查询小问答
	static findServiceStandard(options) {
		const url = baseUrl+"/driver/findServiceStandard"
		return this.get(url, options)
	}
	
	//查询小问答的多选选项
	static findServiceStandardSatisfaction(options) {
		const url = baseUrl+"/driver/findServiceStandardSatisfaction"
		return this.get(url, options)
	}
	
	//保存服务评价标准
	static saveServiceEvaluateRecord(options) {
		const url = baseUrl+"/driver/saveServiceEvaluateRecord"
		return this.post(url, options)
	}
	
	//保存订单抽到的评价问题
	static saveStandardId(options) {
		const url = baseUrl+"/driver/saveStandardId"
		return this.get(url, options)
	}
	
	//计价
	static farerulePrice(options) {
		const url = baseUrl+"/price/farerulePrice"
		return this.get(url, options)
	}
	
	//实时保存轨迹
	static passengerTrackSave(options) {
		const url = baseUrl+"/track/passenger_save"
		return this.post(url, options)
	}
	
	//查询计价规则
	static farerulearea(options) {
		const url = baseUrl+"/price/farerulearea"
		return this.get(url, options)
	}
	
	//预约列表
	static appointList(options){
		const url = baseUrl+"/order/mySubscribeList"
		return this.get(url, options)
	}
	
	//根据司机查询乘客评价信息列表
	static driverRateList(options){
		const url = baseUrl+"/driverwb/selectRatedPassengerListByDriverId"
		return this.get(url, options)
	}
	
	//查询司机的订单数和加入天数
	static driverSum(options){
		const url = baseUrl+"/driverwb/selectDriverOrderSumAndDaySum"
		return this.get(url, options)
	}
	
	//费率查询
	static getFeerate(options){
		const url = baseUrl+"/platform/feerate/info"
		return this.get(url, options)
	}
	
	// =============== 拼团线路 ==================
	static shuttleBusAdd(options){
		const url = baseUrl+"/line/add"
		return this.post(url,options)
	}
	
	static shuttleBusSelect(options){
		const url = baseUrl+"/line/list"
		return this.get(url,options)
	}
	
	// =============== 个人中心 ==================
	// 获取积分总计
	static accpointsSum(options){
		const url = baseUrl+"/record/accpotinsSum"
		return this.get(url,options)
	}
	
	// 获取积分列表
	static recordList(options){
		const url = baseUrl+"/record/recordList"
		return this.get(url,options)
	}
	
	// 保存获取积分
	static saveAccpotins(options){
		const url = baseUrl+"/record/saveAccpotins"
		return this.post(url,options)
	}
	
	// 查看积分规则
	static accpointsRule(options){
		const url = baseUrl+"/record/accpotinsRule"
		return this.get(url,options)
	}
	
	// 发送安全警报短信
	static safetySendSmsCode(options){
		const url = baseUrl+"/safety/safetySendSmsCode"
		return this.post(url,options)
	}
	// 
	static getQrCode(options){
		const url = baseUrl+"/record/shareQrCode"
		return this.get(url,options)
	}
	
	// 钱包记录/wechat/myCenter/selectWalletRecordlist
	static selectWalletRecordlist(options){
		const url = baseUrl+"/myCenter/selectWalletRecordlist"
		return this.get(url,options)
	}
	
	// 消费总额
	static selectOrderMoneySum(options){
		const url = baseUrl+"/myCenter/selectOrderMoneySum"
		return this.get(url,options)
	}
	
	// 被推荐总积分
	static selectDiscountCouponAndIntegral(options){
		const url = baseUrl+"/myCenter/selectDiscountCouponAndIntegral"
		return this.get(url,options)
	}
	
	// 推荐积分详情
	static selectIntegralDetail(options){
		const url = baseUrl+"/myCenter/selectIntegralDetail"
		return this.get(url,options)
	}

	// =============== 开具发票 ================== 
	// 添加发票抬头
	static addinvoicetitle(options){
		const url = baseUrl+"/passfapiao/title/add"
		return this.post(url,options)
	}
	// 修改发票抬头 
	static editinvoicetitle(options){
		const url = baseUrl+"/passfapiao/title/edit"
		return this.post(url,options)
	}
	// 发票抬头查询
	static invoicetitlelist(options){
		const url = baseUrl+"/passfapiao/title/list"
		return this.get(url,options)
	}
	// 开票历史 
	static applyhistory(options){
		const url = baseUrl+"/passfapiao/order/applyhistory"
		return this.get(url,options)
	}
	// 查询发票订单信息 
	static orderinfos(options){
		const url = baseUrl+"/passfapiao/order/infos"
		return this.get(url,options)
	}
	// 乘客重发发票 
	static invoiceretry(options){
		const url = baseUrl+"/passfapiao/order/retry"
		return this.post(url,options)
	}
	// 开发票订单 
	static paidOrder(options){
		const url = baseUrl+"/passfapiao/paidOrder/infos"
		return this.get(url,options)
	}
	// 最近历史抬头信息 
	static recentlyUsed(options){
		const url = baseUrl+"/passfapiao/title/recentlyUsed"
		return this.get(url,options)
	}
	// 开发票申请 
	static apply(options){
		const url = baseUrl+"/passfapiao/order/apply"
		return this.post(url,options)
	}
	// 查看用户是否有驳回信息 
	static reject(options){
		const url = baseUrl+"/passfapiao/order/reject"
		return this.get(url,options)
	}
	// 重开发票 
	static reopenfapiao(options){
		const url = baseUrl+"/passfapiao/order/reopen"
		return this.post(url,options)
	}

	//======== 一键叫车 ============
	// 常用地址
	static selectPassengerAddr(options){
		const url = baseUrl+"/myCenter/selectPassengerAddr"
		return this.get(url,options)
	}
	// 新增常用地址
	static addPassengerAddr(options){
		const url = baseUrl+"/myCenter/addPassengerAddr"
		return this.post(url,options)
	}
	
	// 亲情账户
	static selectPassengerFamily(options){
		const url = baseUrl+"/myCenter/selectPassengerFamily?passengerId="+options.passengerId
		return this.post(url)
	}
	// 新增亲情账户
	static addPassengerFamily(options){
		const url = baseUrl+"/myCenter/addPassengerFamily"
		return this.post(url,options)
	}
	// 修改亲情账户
	static updatePassengerFamily(options){
		const url = baseUrl+"/myCenter/updatePassengerFamily"
		return this.post(url,options)
	}
	// 删除亲情账户
	static removePassengerFamily(options){
		const url = baseUrl+"/myCenter/removePassengerFamily?uuid="+options.uuid
		return this.post(url,options)
	}
	
	// 常用联系人
	static selectPassengerCommon(options){
		const url = baseUrl+"/myCenter/selectPassengerCommon?passengerId="+options.passengerId
		return this.post(url,{})
	}
	// 新增常用联系人
	static addPassengerCommon(options){
		const url = baseUrl+"/myCenter/addPassengerCommon"
		return this.post(url,options)
	}
	// 修改常用联系人
	static updatePassengerCommon(options){
		const url = baseUrl+"/myCenter/updatePassengerCommon"
		return this.post(url,options)
	}
	// 删除常用联系人
	static removePassengerCommon(options){
		const url = baseUrl+"/myCenter/removePassengerCommon?uuid="+options.uuid
		return this.post(url,options)
	}
	//获取一键叫车最优优惠券

	// =========签到==========
	
	// 签到记录 
	static signrecord(options){
		const url = baseUrl+"/member/sign/record"
		return this.get(url,options)
	}
	// 签到
	static addsign(options){
		const url = baseUrl+"/member/sign/add"
		return this.post(url,options)
	}
	
	// ========== 会员 ============= 
	static passenger(options){
		const url = baseUrl+`/member/passenger/${options}`
		return this.get(url)
	}
	
	// 权益列表
	static benefitList(options){
		const url = baseUrl+`/member/passenger/benefitList`
		return this.get(url)
	}
	
	static benefitCouponList(options){
		const url = baseUrl+"/member/passenger/benefitCouponList"
		return this.get(url,options)
	}
	
	// ======== 任务中心 ========
	static taskComp(options){
		const url = baseUrl+"/member/passenger/taskComp"
		return this.get(url,options)
	}
	
	// ======== 投诉 =========
	// 新增
	static addComplainsRecord(options){
		const url = baseUrl+"/myCenter/addComplainsRecord"
		return this.post(url,options)
	}
	// 申诉
	static complainsRecordEdit(options){
		const url = baseUrl+"/myCenter/complainsRecordEdit"
		return this.post(url,options)
	}
	// 照片上传
	static complainsRecordPhoto(options){
		const url = baseUrl+"/myCenter/complainsRecordPhoto"
		return this.get(url,options)
	}
	// 查询投诉记录列表
	static addComplainsRecordList(options){
		const url = baseUrl+"/myCenter/addComplainsRecordList"
		return this.get(url,options)
	}
	// 查询投诉记录详情
	static complainsRecordDetail(options){
		const url = baseUrl+"/myCenter/complainsRecordDetail"
		return this.get(url,options)
	}
	
	// ========= 查看平台规则 ==============
	static getRuleList(options){
		const url = baseUrl+"/price/sendOrderRuleList"
		return this.get(url,options)
	}
	
	// === 定制客运
	// 线路类型列表：定制客运、港澳直通车...
	static customLineTypeList(options){
		const url = baseUrl+"/custom/line/type/list";
		return this.get(url, options);
	}
	
	static customLineList(options){
		const url = baseUrl+"/custom/line/list";
		return this.get(url, options);
	}
	
	static customLineOrderCreate(options){
		const url = baseUrl+"/custom/line/order/create";
		return this.post(url, options);
	}
	
	static customLineOrderList(options){
		const url = baseUrl+"/custom/line/order/list";
		return this.get(url, options);
	}
	
	//q
	static customLinePay(options){
		const url = baseUrl+"/custom/line/pay/order";
		return this.post(url, options);
	}
	
	//取消订单
	static customLineCancel(options){
		const url = baseUrl+"/custom/line/order/cancel";
		return this.post(url, options);
	}
	
	//删除订单
	static customLineDel(options){
		const url = baseUrl+"/custom/line/order/del";
		return this.post(url, options);
	}
	
	//查看城市列表
	static customLineAreaList(options){
		const url = baseUrl+"/area/line/list";
		return this.get(url, options);
	}
	
	//查询线路价格
	static stationPrice(options){
		const url = baseUrl+"/custom/line/station/price";
		return this.get(url, options);
	}
	
	static orderPayment(options){
		const url = baseUrl+"/custom/line/order/payment";
		return this.get(url, options);
	}
	
	//包车-公司列表
	static companyList(options){
		const url = "/monitor/dbc/company/list";
		return this.get(url, options);
	}
	
	//=========一票预约网约车=========
	static oneVote(options){
		const url = baseUrl+"/one/vote/pay";
		return this.get(url, options);
	}
	
	static payNotify(options){
		const url = baseUrl+"/one/vote/payNotify/test";
		return this.post(url, options);
	}
	
	//退票
	static oneVoteRefund(options){
		const url = baseUrl+"/one/vote/refund";
		return this.post(url, options);
	}
	
	
	
	//-----------------定制票业务--------------------
	static dzpOrderDetail(options){
		const url = baseUrl+"/custom/line/order/detail";
		return this.get(url, options);
	}
	
}